import request from "./request"
import {formatTime} from '@/utils/utils'

export const getList = (currentPage,pageSize)=>{
  return request({
    url:"/repair/find_on_condition",
    method:"get",
    params:{
      currentPage,
      pageSize
    }
  })
}

export const getServiceFilterList = (data)=>{
  return request({
    url:"/repair/filter_service",
    method:"post",
    data
  })
}

export const receiveOrder = (orderid,receiverInfo) =>{
  let receiveTime = formatTime(Date.now())
  return request({
    url:'repair/receive',
    method:"post",
    data:{
      orderid,
      receiverInfo,
      receiveTime,
    }
  })
}

export const getPersonalList = (id,currentPage,pageSize) =>{
  return request({
    url:"repair/personal",
    method:"post",
    data:{
      id,
      currentPage,
      pageSize
    }
  })
}